A visual display such as a graphical user interface presented by software may include objects and containers. An object can be any item on a visual display. A container can be an object upon or within which other objects are presented. For example, a container, such as a spreadsheet or word processing document, may include a number of objects, such as cells, graphics, user interface elements, and others. The objects within such a container may have a defined presentation size, position, etc. This presentation may be defined and edited dynamically by the software displaying the container and objects. For example, an object may be moved, resized, rotated, etc. within its container during execution of the software presenting that object. These editing actions may be initiated by a user action such as dragging and dropping an object using a mouse or other pointing device or may be initiated by the software itself in response to some other event.
Typically, a body of code within the application is responsible for arranging elements of a visual display such as objects and containers. For example, an application program presenting a number of objects includes code representing a layout editor, sometimes referred to as a “form editor” or “2D editor,” for arranging and/or editing the appearance of the containers and objects presented by that application. However, to function properly, the layout editor requires specific, prior knowledge of the parent container for the objects to be edited. For example, the layout editor must have specific knowledge of the type of container, the size of the container and other attributes for that container in order to properly present the objects. This information is important to the layout editor because an object may be sized, positioned, etc, within its parent container differently based on the type of container in which it is placed. For example, depending on the type of container in which an object is displayed, a container may position the object based on an absolute position or size given in x,y coordinates and/or offset values, a radius and/or angular value, an ordinal value, and others. For example, if the container presents objects based on absolute positioning, the layout editor should use the absolute positioning values to edit the object. In another example, if the objects are positioned in a flowing manner from left to right along a top or bottom edge of the container an object ordinal value should be used to edit the position of the objects.
For the layout editor to have such specific knowledge of the parent container and change properties of the container and objects within that container based on that knowledge and the editing operation, the layout editor of the application consists of extensive code. Further complicating matters, an object may be placed on an arbitrary surface in a container that may arbitrarily arrange its children. Therefore, the changes made by the layout editor will be ineffective.
As such, there is no simple manner in which an application may arrange or edit objects on a display without consideration of the type of container in which the object will be placed. Additionally, an application's layout editor is limited to editing only objects within a container for which it has specific knowledge. It is with respect to these considerations and others that the present invention has been made.